// object 表示一个js对象
let aa: object;
aa = {};
aa = function () {};
// {}用来指定对象中可以包含哪些属性
let bb: {name: string, age?: number}
bb = {name: '1232'}
// [propName: string]: any 表示任意类型属性
let cc: {name: string, [propName: string]: any}
cc = {name: '222', age: 18, gender: '女'}
let dd: (a: number, b: number) => number;
dd = function (n1 , n2):number {
    return n1 + n2
}
// string[]表示字符串数组 number[]数字数组 Array<number>
let ee: string[];

// 元组 固定长度的数组
let h: [string, number]
h = ['hello', 1]
// enum枚举
enum Gender {
    Male = 0,
    Female = 1
}
let g: {name: string, gender: Gender}
g = {
    name: 'aaa',
    gender: Gender.Male,
}
let j: {name: string} & { age: number}
j = {name: 'll', age: 2}

// 类型的别名
type myType = string | number | boolean
let k: myType;
let l: myType;
